import { createStore } from 'vuex'

//创建一个store实例
export default createStore({
    state: {
        targetVariable: null
    },
    mutations: {
        SET_TARGET_VARIABLE(state, value) {
            state.targetVariable = value
        }
    },
    actions: {
        updateVariable({ commit }, value) {
            commit('SET_TARGET_VARIABLE', value)
        }
    }
})
